const { defineConfig } = require('@vue/cli-service')
const path = require('path')
function resolve(dir) {
  return path.join(__dirname, dir)
}
module.exports = defineConfig({
  transpileDependencies: true,
  publicPath: '/',
  outputDir: 'dist',
  // assetsDir: 'static',
  // lintOnSave: process.env.NODE_ENV === 'development',
  indexPath: 'index.html',
  productionSourceMap: false,
  chainWebpack: (config) => {
    config.resolve.alias // 添加别名
      .set('@', resolve('src'))
      // .set('@assets', resolve('src/assets'))
      // .set('@components', resolve('src/components'))
      // .set('@views', resolve('src/views'))
      // .set('@store', resolve('src/store'))
  },
  devServer: {
    host: '127.0.0.1',
    hot: true,
    port: 8087,
    open: true,
    compress: true,
    historyApiFallback: true,
  }
})
